﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MyVoteMVC.Domain
{
    public class VT_Questions
    {
        public VT_Questions()
        {
            Items = new List<VT_Items>();
        }

        /// <summary>
        /// PK Guid
        /// </summary>
        public string Question_ID { get; set; }

        /// <summary>
        /// FK 所属活动ID
        /// </summary>
        public string Activity_ID { get; set; }

        /// <summary>
        /// 自编号
        /// </summary>
        public int? Question_No { get; set; }

        /// <summary>
        /// 问题标题
        /// </summary>
        public string Question_Title { get; set; }

        /// <summary>
        /// 问题描述
        /// </summary>
        public string Question_Content { get; set; }

        /// <summary>
        /// 问题是否必答
        /// </summary>
        public int? Question_IfMustAnswer { get; set; }

        public string Question_IfMustAnswerText
        {
            get
            {
                return (Question_IfMustAnswer.Value == 1 ? "是" : "否");
            }
        }
        /// <summary>
        /// 问题是否多选
        /// </summary>
        public int? Question_IfMultiItems { get; set; }

        public string Question_IfMultiItemsText
        {
            get
            {
                return (Question_IfMultiItems.Value == 1 ? "是" : "否");
            }
        }

        /// <summary>
        /// 问题状态
        /// </summary>
        public int? Question_Status { get; set; }

        public string Question_StatusText
        {
            get
            {
                return (Question_Status.Value == 1 ? "有效" : "无效");
            }
        }

        /// <summary>
        /// 创建人
        /// </summary>
        public string Created_By { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? Created_Date { get; set; }

        /// <summary>
        /// 创建方法
        /// </summary>
        public string Created_Action { get; set; }

        /// <summary>
        /// 更新人
        /// </summary>
        public string Last_Update_By { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? Last_Update_Date { get; set; }

        /// <summary>
        /// 更新方法
        /// </summary>
        public string Last_Update_Action { get; set; }

        public int? MultiCount { get; set; }

        //LazyLoad
        /// <summary>
        /// 问题相关的活动
        /// </summary>
        public virtual VT_Activities Activity { get; set; }

        /// <summary>
        /// 问题相关的选项
        /// </summary>
        public virtual ICollection<VT_Items> Items { get; set; }
             
    }
}
